package com.tudouji.project.copy.domain;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 待同步数据对象 copytokd
 * 
 * @author wf
 * @date 2021-01-07
 */
public class Copytokd {
	private static final long serialVersionUID = 1L;

	/** $column.columnComment */
	private Long id;

	/** 出入库单guid */
	private Long linkedautoid;

	private String linkedcode;

	/** 业务单据guid */
	private String orderguid;

	/** 业务单据编号 */
	@Excel(name = "业务单据编号")
	private String code;

	/** 金蝶业务单据编号 */
	@Excel(name = "金蝶业务单据编号")
	private String kdcode;

	/** 单据类型 */
	@Excel(name = "单据类型")
	private Integer type;

	/** 子类型 */
	@Excel(name = "子类型")
	private Integer subtype;

	/** 推送金蝶系统的单据类型006采购入库007 销售出库008 其他入库009其他出库 */
	@Excel(name = "推送金蝶系统的单据类型006采购入库007	销售出库008 其他入库009其他出库")
	private String kdtype;

	/** 库房id */
	private String srguid;

	/** 库房名称 */
	@Excel(name = "库房名称")
	private String srname;

	/** 金蝶系统库房编码 */
	private String srKdn;

	/** 库存组织id */
	private String orgguid;

	/** 金蝶系统组织编码 */
	private String orgKdn;

	/** 库存组织名称 */
	@Excel(name = "库存组织名称")
	private String orgname;

	/** 总数量 */
	@Excel(name = "总数量")
	private BigDecimal totalqty;

	/** 总金额 */
	@Excel(name = "总金额")
	private BigDecimal totalamount;

	/** ERP系统供应商id */
	private Long supplierid;

	/** 金蝶系统供应商编号 */
	private String supplierKdn;

	/** 供应商名称 */
	@Excel(name = "供应商名称")
	private String suppliername;

	/** ERP系统客户id */
	private String customerid;

	/** 金蝶系统客户编号 */
	private String customerKdn;

	/** 客户名称 */
	@Excel(name = "客户名称")
	private String customername;

	private Integer issplit;

	/** 状态1-初始 2-待同步 3-资料不全，无法同步 4-同步失败 5-同步成功 6-已分拆 */
	@Excel(name = "状态1-初始 2-待同步 3-资料不全，无法同步 4-同步失败 5-同步成功 6-已分拆")
	private Integer status;

	/** 操作人员 */
	private String operator;

	/** operator对应的金蝶用户编号 */
	private String operatorKdn;

	/** 原单据业务时间 */
	private Date orderdate;

	/** 首次数据同步时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Excel(name = "首次数据同步时间", width = 30, dateFormat = "yyyy-MM-dd")
	private Date copyTime;

	/** 最后一次同步时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Excel(name = "最后一次同步时间", width = 30, dateFormat = "yyyy-MM-dd")
	private Date lastCopyTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createtime;

	/** 同步信息 */
	private String copyRemark;

	private Integer sellpaytype;

	private List<Copytokditem> copytokditemList;

	private Date beginTime;

	private Date endTime;

	private String businessPrefix;

	private List<Integer> statusList;

	/** 币种 */
	@Excel(name = "币种")
	private Integer currency;

	/** 金蝶系统币种编码 */
	@Excel(name = "金蝶系统币种编码")
	private String currencyKdn;

	private String subtypes;

	private String kdsellpaytype;

	private String departmentid;

	private String departmentname;

	private String departmentkdnum;

	private Long parentid;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date pushdate;

	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date startPushDate;

	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date endPushDate;

	public Date getStartPushDate() {
		return startPushDate;
	}

	public void setStartPushDate(Date startPushDate) {
		this.startPushDate = startPushDate;
	}

	public Date getEndPushDate() {
		return endPushDate;
	}

	public void setEndPushDate(Date endPushDate) {
		this.endPushDate = endPushDate;
	}

	public Integer getIssplit() {
		return issplit;
	}

	public void setIssplit(Integer issplit) {
		this.issplit = issplit;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public Long getLinkedautoid() {
		return linkedautoid;
	}

	public void setLinkedautoid(Long linkedautoid) {
		this.linkedautoid = linkedautoid;
	}

	public void setOrderguid(String orderguid) {
		this.orderguid = orderguid;
	}

	public String getOrderguid() {
		return orderguid;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setKdcode(String kdcode) {
		this.kdcode = kdcode;
	}

	public String getKdcode() {
		return kdcode;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getType() {
		return type;
	}

	public void setSubtype(Integer subtype) {
		this.subtype = subtype;
	}

	public Integer getSubtype() {
		return subtype;
	}

	public void setKdtype(String kdtype) {
		this.kdtype = kdtype;
	}

	public String getKdtype() {
		return kdtype;
	}

	public void setSrguid(String srguid) {
		this.srguid = srguid;
	}

	public String getSrguid() {
		return srguid;
	}

	public void setSrname(String srname) {
		this.srname = srname;
	}

	public String getSrname() {
		return srname;
	}

	public void setSrKdn(String srKdn) {
		this.srKdn = srKdn;
	}

	public String getSrKdn() {
		return srKdn;
	}

	public void setOrgguid(String orgguid) {
		this.orgguid = orgguid;
	}

	public String getOrgguid() {
		return orgguid;
	}

	public void setOrgKdn(String orgKdn) {
		this.orgKdn = orgKdn;
	}

	public String getOrgKdn() {
		return orgKdn;
	}

	public void setOrgname(String orgname) {
		this.orgname = orgname;
	}

	public String getOrgname() {
		return orgname;
	}

	public void setTotalqty(BigDecimal totalqty) {
		this.totalqty = totalqty;
	}

	public BigDecimal getTotalqty() {
		return totalqty;
	}

	public void setTotalamount(BigDecimal totalamount) {
		this.totalamount = totalamount;
	}

	public BigDecimal getTotalamount() {
		return totalamount;
	}

	public void setSupplierid(Long supplierid) {
		this.supplierid = supplierid;
	}

	public Long getSupplierid() {
		return supplierid;
	}

	public void setSupplierKdn(String supplierKdn) {
		this.supplierKdn = supplierKdn;
	}

	public String getSupplierKdn() {
		return supplierKdn;
	}

	public void setSuppliername(String suppliername) {
		this.suppliername = suppliername;
	}

	public String getSuppliername() {
		return suppliername;
	}

	public void setCustomerid(String customerid) {
		this.customerid = customerid;
	}

	public String getCustomerid() {
		return customerid;
	}

	public void setCustomerKdn(String customerKdn) {
		this.customerKdn = customerKdn;
	}

	public String getCustomerKdn() {
		return customerKdn;
	}

	public void setCustomername(String customername) {
		this.customername = customername;
	}

	public String getCustomername() {
		return customername;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return status;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperatorKdn(String operatorKdn) {
		this.operatorKdn = operatorKdn;
	}

	public String getOperatorKdn() {
		return operatorKdn;
	}

	public void setOrderdate(Date orderdate) {
		this.orderdate = orderdate;
	}

	public Date getOrderdate() {
		return orderdate;
	}

	public void setCopyTime(Date copyTime) {
		this.copyTime = copyTime;
	}

	public Date getCopyTime() {
		return copyTime;
	}

	public void setLastCopyTime(Date lastCopyTime) {
		this.lastCopyTime = lastCopyTime;
	}

	public Date getLastCopyTime() {
		return lastCopyTime;
	}

	public void setCopyRemark(String copyRemark) {
		this.copyRemark = copyRemark;
	}

	public String getCopyRemark() {
		return copyRemark;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Integer getSellpaytype() {
		return sellpaytype;
	}

	public void setSellpaytype(Integer sellpaytype) {
		this.sellpaytype = sellpaytype;
	}

	public List<Copytokditem> getCopytokditemList() {
		return copytokditemList;
	}

	public void setCopytokditemList(List<Copytokditem> copytokditemList) {
		this.copytokditemList = copytokditemList;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public List<Integer> getStatusList() {
		return statusList;
	}

	public void setStatusList(List<Integer> statusList) {
		this.statusList = statusList;
	}

	public String getLinkedcode() {
		return linkedcode;
	}

	public void setLinkedcode(String linkedcode) {
		this.linkedcode = linkedcode;
	}

	public String getBusinessPrefix() {
		return businessPrefix;
	}

	public void setBusinessPrefix(String businessPrefix) {
		this.businessPrefix = businessPrefix;
	}

	public void setCurrency(Integer currency) {
		this.currency = currency;
	}

	public Integer getCurrency() {
		return currency;
	}

	public void setCurrencyKdn(String currencyKdn) {
		this.currencyKdn = currencyKdn;
	}

	public String getCurrencyKdn() {
		return currencyKdn;
	}

	public String getSubtypes() {
		return subtypes;
	}

	public void setSubtypes(String subtypes) {
		this.subtypes = subtypes;
	}

	public String getKdsellpaytype() {
		return kdsellpaytype;
	}

	public void setKdsellpaytype(String kdsellpaytype) {
		this.kdsellpaytype = kdsellpaytype;
	}

	public String getDepartmentid() {
		return departmentid;
	}

	public void setDepartmentid(String departmentid) {
		this.departmentid = departmentid;
	}

	public String getDepartmentname() {
		return departmentname;
	}

	public void setDepartmentname(String departmentname) {
		this.departmentname = departmentname;
	}

	public String getDepartmentkdnum() {
		return departmentkdnum;
	}

	public void setDepartmentkdnum(String departmentkdnum) {
		this.departmentkdnum = departmentkdnum;
	}

	public Long getParentid() {
		return parentid;
	}

	public void setParentid(Long parentid) {
		this.parentid = parentid;
	}

	public Date getPushdate() {
		return pushdate;
	}

	public void setPushdate(Date pushdate) {
		this.pushdate = pushdate;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("linkedautoid", getLinkedautoid()).append("orderguid", getOrderguid()).append("code", getCode())
				.append("kdcode", getKdcode()).append("type", getType()).append("subtype", getSubtype())
				.append("kdtype", getKdtype()).append("srguid", getSrguid()).append("srname", getSrname())
				.append("srKdn", getSrKdn()).append("orgguid", getOrgguid()).append("orgKdn", getOrgKdn())
				.append("orgname", getOrgname()).append("totalqty", getTotalqty())
				.append("totalamount", getTotalamount()).append("supplierid", getSupplierid())
				.append("supplierKdn", getSupplierKdn()).append("suppliername", getSuppliername())
				.append("customerid", getCustomerid()).append("customerKdn", getCustomerKdn())
				.append("customername", getCustomername()).append("status", getStatus())
				.append("operator", getOperator()).append("operatorKdn", getOperatorKdn())
				.append("orderdate", getOrderdate()).append("copyTime", getCopyTime())
				.append("lastCopyTime", getLastCopyTime()).append("copyRemark", getCopyRemark())
				.append("createtime", getCreatetime()).toString();
	}

	public String getValueByParam(String param) {
		try {
			Field field = this.getClass().getDeclaredField(param);
			// 设置对象的访问权限，保证对private的属性的访问
			field.setAccessible(true);
			return field.get(this) == null ? "" : field.get(this).toString();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
